<?php
namespace app\index\middleware;

class CheckLogin {
    /**
     * 处理请求
     *
     * @param \think\Request $request
     * @param \Closure       $next
     * @return Response
     */
    public function handle($request, \Closure $next) {
        //halt(session('uid'));
        if (!session('?uid')) {
            return redirect('/index/login.html');
        }
        return $next($request);
    }
}